Portable device, method of detecting operation, and computer-readable storage medium storing program for detecting operation

ABSTRACT

A mobile telephone includes a touch panel, an acceleration sensor which detects an acceleration, and an operation detection unit which detects a predetermined operation in accordance with the acceleration detected by the acceleration sensor while an instruction made by the touch panel is being detected. For this, it is possible to detect an operation to press the touch panel while a user finger is in contact with the touch panel.

TECHNICAL FIELD

The present invention relates to a portable device, a method ofdetecting an operation, and a computer-readable storage medium storing aprogram for detecting an operation, and more particularly, to a portabledevice including a touch panel 5, as well as a method of detecting anoperation executed by such a portable device, and a computer-readablestorage medium storing a program for detecting an operation executed bythe same.

BACKGROUND ART

Recently, mobile phones have appeared on the market having a liquidcrystal display (hereinafter referred to as an “LCD”) and a touch panel5 placed upon it. The liquid crystal display displays an image includinga plurality of keys, where touch panel 5 detects an indication for oneof the keys and receives the input of a number or a character (seePatent Document 1, for example). In such a mobile phone, inputtingalphabet, hiragana or katakana involves allocating a plurality ofcharacters to a key and receiving the input of one of the charactersdepending on the number of times the key is depressed consecutively.

While touch panel 5 is capable of detecting a position indicated, if anoperation involving a plurality of indications in one and the sameposition is to be detected by touch panel 5, the user must perform twooperations: touching touch panel 5 with a finger and then lifting thefinger off the panel each time the key is depressed. As a result,operations can be troublesome.

-   [Patent Document 1] Japanese Patent Laid-Open No. 2005-92441

DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention

The present invention was made to solve this problem. An object of thepresent invention is to provide a portable device capable of detectingan operation in which a user depresses a touch panel while continuouslytouching the touch panel.

Another object of the present invention is to provide a method ofdetecting an operation that allows detection of an operation in which auser depresses a touch panel while continuously touching the touchpanel.

Yet another object of the present invention is to provide acomputer-readable storage medium storing a program for detecting anoperation that allows detection of an operation in which a userdepresses a touch panel while continuously touching the touch panel.

Means for Solving the Problems

To achieve the above object, according to an aspect of the presentinvention, a portable device includes: a touch panel; an accelerationsensor detecting an acceleration value; and a detecting means detectinga specified operation based on an acceleration value detected by theacceleration sensor while an indication is being detected by the touchpanel.

According to another aspect of the present invention, a method ofdetecting an operation is performed by a portable device including atouch panel, including the steps of: detecting an acceleration value;and detecting a specified operation based on an acceleration valuedetected while an indication is being detected by the touch panel.

According to yet another aspect of the present invention, a program fordetecting an operation stored in a computer-readable storage medium isexecuted by a portable device including a touch panel, for causing acomputer to execute the steps of; detecting an acceleration value; anddetecting a specified operation based on an acceleration value detectedwhile an indication is being detected by the touch panel.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of an external appearance of a mobile phoneaccording to an embodiment of the present invention.

FIG. 2 is a functional block diagram showing an example of a set offunctions of the mobile phone according to the present embodiment.

FIG. 3 is a functional block diagram schematically showing functions ofthe control unit.

FIG. 4 shows an example of a set of acceleration values A(n).

FIG. 5 shows an example of a set of primary differential values B(n).

FIG. 6 shows an example of a set of moving averages S(n).

FIG. 7 shows an example of a set of secondary differential values B(n).

FIG. 8 is a flow chart showing an example of a flow of a process fordetecting an operation.

BEST MODES FOR CARRYING OUT THE INVENTION

Now, an embodiment of the present invention will be described withreference to drawings. In the description below, like components arelabeled with like reference characters, and have identical names andfunctions. Therefore, their detailed description will not be repeated.

FIG. 1 is a perspective view of an external appearance of a mobile phoneaccording to an embodiment of the present invention. Referring to FIG.1, a mobile phone 1, which serves as a portable device, includes on itsupper side an LCD 3, a touch panel 5 placed upon LCD 3, a speaker 7comprising a receiver, and a microphone 9. While the present embodimentshows a mobile phone 1 with an LCD 3, LCD 3 may be replaced with anorganic EL (electroluminescence) display.

Touch panel 5 may be a pressure-sensitive panel, in which case changesin pressure are sensed, or may be an electrostatic panel, where electricsignals generated by static electricity are sensed. If an electrostatictouch panel 5 is used, touch panel 5 may be placed on the backside ofLCD 3. The present embodiment uses an electrostatic panel. When a usertouches touch panel 5 with a finger, touch panel 5 detects the positiontouched by the user with the finger as an indicated position. While theuser is touching touch panel 5 with the finger, the panel outputs thedetected indicated position to a control unit 11. If the user continuesto indicate one and the same position, the same indicated position isoutput continuously to control unit 11. It should be noted that anindicated position may be output to control unit 11 at predeterminedtime intervals white the user is touching touch panel 5 with the finger.In this case, too, control unit 11 can detect the user continuouslytouching touch panel 5 with the finger.

FIG. 2 is a functional block diagram showing an example of a set offunctions of the mobile phone according to the present embodiment.Referring to FIG. 2, mobile phone 1 includes: a control unit 11 forcontrolling the entire mobile phone 1; a radio circuit 13 connected toan antenna 13A; a codec unit 21 for processing audio data; a microphone9 and a speaker 7 connected to codec unit 21; an LCD 3; a touch panel 5;a RAM (random-access memory) 15 used as a working area for control unit11; an EEPROM (electronically erasable and programmable read-onlymemory) 17 for storing, for example, a program to be executed by controlunit 11; an acceleration sensor 19; a vibration unit 23; and a cardinterface (I/F) 25.

Radio circuit 13 communicates wirelessly with a device at a base stationconnected to the communication network. A radio signal sent by a deviceat a base station is received by antenna 13A. Radio circuit 13 receivesthe radio signal received by antenna 13A, and outputs the radio signaldemodulated into an audio signal to codec unit 21. Radio circuit 13 alsoreceives an audio signal from codec unit 21, and outputs the audiosignal modulated into a radio signal to antenna 13A. The radio signalsent from antenna 13A is received by a device at a base station.

Codec unit 21 decodes an audio signal input from radio circuit 13,converts the decoded digital audio signal to an analog one, amplifiesit, and outputs it to speaker 7. Codec unit 21 also receives an analogaudio signal from microphone 9, converts the audio signal to a digitalone, encodes it, and outputs the encoded audio signal to radio circuit13.

A detachable flash memory 27 is mounted on card I/F 25. Control unit 11can access flash memory 27 via card I/F25. While in the presentembodiment a program to be executed by control unit 11 is stored inEEPROM 17, a program may be stored in flash memory 27, from which theprogram may be read and executed by control unit 11. Such a storagemedium storing a program does not have to be flash memory 27 and may bea flexible disc, a cassette tape, an optical disc (CD-ROM (compactdisc-ROM)/MO (magnetic optical disc)/MD (mini-disc)/DVD (digitalversatile disc)), an IC card, an optical card, or a semiconductor memorysuch as a mask ROM, an EPROM (erasable programmable ROM), or an EEPROM(electronically EPROM).

Also, mobile phone 1 may be connected to the Internet via radio circuit13, where a program may be downloaded from a computer connected to theInternet and be executed by control unit 11. Such a program does nothave to be a program directly executable by control unit 11, but alsoincludes a source program, a compressed program, an encrypted program orthe like.

Acceleration sensor 19 detects acceleration and outputs the detectedacceleration value to control unit 11. The direction of the accelerationvalue detected by acceleration sensor 19 is the direction in whichmobile phone 1 moves in a hand of the user who holds it when the userdepresses touch panel 5. Preferably, the acceleration value detected byacceleration sensor 19 is in the direction perpendicular to the surfaceof touch panel 5. It should be noted that the direction perpendicular tothe surface of touch panel 5 includes directions that are not exactlyperpendicular due to a manufacturing error.

FIG. 3 is a function block diagram schematically showing functions ofthe control unit. Referring to FIG. 3, control unit 11 includes anindicated position receiving unit 51 that receives an indicated positionfrom touch panel 5, an operation detection unit 53 that detects aspecified operation, a signal determining unit 55 that determines onesignal out of a plurality of predetermined signals, and a displaycontrol unit 57 that controls the display on LCD 5.

Display control unit 57 controls LCD 7 and displays an image on LCD 7.For the purposes of explanation, the present embodiment describes animage including a plurality of keys displayed on LCD 7. Display controlunit 57 outputs, to signal determining unit 55, key informationincluding a pair of items: name and area, for each of the keys containedin the image displayed on LCD 7.

Indicated position receiving unit 51 receives an indicated positionoutput from touch panel 5, and outputs the received indicated positionto operation detection unit 53 and signal determining unit 55. If theuser continuously touches the surface of touch panel 5, indicatedposition receiving unit 51 continuously outputs the indicated positionto operation detection unit 53 and signal determining unit 55 as long asthe user is touching touch panel 5.

While the user is holding mobile phone 1 in a hand, operation detectionunit 53 detects an operation in which the user depresses touch panel 5with a finger while continuously touching touch panel 5 with the finger.When the user depresses touch panel 5 with a finger while continuouslytouching touch panel 5 with the finger, the upper surface of mobilephone 1, which has touch panel 5 mounted on it, is pressed, such thatmobile phone 1 is moved in space by the user's hand. This movement maybe a reciprocating motion in a direction generally perpendicular to thesurface of touch panel 5, or may be reciprocating motion back and forthin a circular orbit around a wrist. Since the distance of movement ofsuch a reciprocating motion is very small, the movement of mobile phone1 is in a direction generally perpendicular to touch panel 5. Operationdetection unit 53 detects a reciprocating motion of mobile phone 1 basedon an acceleration value input from acceleration sensor 19 while anindicated position is being input from indicated position receiving unit51, in order to detect an operation in which the user depresses touchpanel 5 with a finger while continuously touching touch panel 5 with afinger.

For this purpose, operation detection unit 53 includes: an accelerationdetecting unit 61 that receives an acceleration value output byacceleration sensor 19; a primary differential calculating unit 63 thatdifferentiates acceleration values; a moving average calculating unit 65that calculates the moving average of differentiated accelerationvalues; a secondary differential calculating unit 67 that differentiatemoving averages; a local maximum extraction unit 69 that extracts alocal maximum for moving averages; a local minimum extraction unit 71that extracts a local minimum for moving averages; and a differencecalculating unit 73 that calculates the difference between a localmaximum and a local minimum.

Acceleration detecting unit 61 receives an indicated position fromindicated position receiving unit 51, and an acceleration value formacceleration sensor 19. At predetermined intervals, accelerationdetecting unit 61 samples an acceleration value output by accelerationsensor 19 while an indicated position is being input from indicatedposition receiving unit 51, and outputs the sampled acceleration valueto primary differential calculating unit 63. An acceleration valueoutput by acceleration detecting unit 61 is denoted by A(n). Thevariable n is a positive integer and denotes a sampling point. When noindicated position is input from indicated position receiving unit 51,acceleration detecting unit 61 resets the variable n to “1” and, when anindicated position is then input from indicated position receiving unit51, initiates sampling and outputs an acceleration value A(n). FIG. 4shows an example of a set of acceleration values A(n).

Primary differential calculating unit 63 differentiates accelerationvalues input from acceleration detecting unit 61. In this embodiment,the value obtained by differentiating acceleration values once isreferred to as a primary differential value B(n). The primarydifferential value B(n) denotes a change in acceleration values A(n) andis suitably used for detecting a reciprocating motion of mobile phone 1.Specifically, a primary differential value B(n) can be calculated byusing the following equation (1):

B(n)=(A(n+1)−A(n−1))/2  (1)

Primary differential calculating unit 63 outputs the calculated primarydifferential value B(n) to moving average calculating unit 65. FIG. 5shows an example of a set of primary differential values B(n). Theprimary differential values B(n) shown in FIG. 5 are primarydifferential values calculated based on the acceleration values A(n)shown in FIG. 4.

Moving average calculating unit 65 calculates a moving average ofprimary differential values B(n) for a predetermined time period. Amoving average is calculated in order to remove noise. Particularly, itcan remove vibrations with shorter cycles than vibrations from anoperation in which the user depresses touch panel 5 with a finger.Specifically, the moving average S(n), which is the average of sixconsecutive primary differential values, can be calculated by using thefollowing equation (2):

S(n)=(B(n−5)+B(n−4)+B(n−3)+B(n−2)+B(n−1)+B(n))/6  (2)

Moving average calculating unit 65 outputs the calculated moving averageS(n) to secondary differential calculating unit 67, local maximumextraction unit 69 and local minimum extraction unit 71. FIG. 6 shows anexample of a set of moving averages S(n). The moving averages S(n) shownin FIG. 6 are moving averages calculated from the primary differentialvalues B(n) shown in FIG. 5.

It should be noted that, while in the present embodiment a movingaverage is the average of six consecutive primary differential values,the number of primary differential values that are moving-averaged canbe determined by the time period suitable for the detection of changesin acceleration due to an operation in which the user depresses touchpanel 5 with a finger while continuously touching touch panel 5 with thefinger, and by the sampling cycle. The time period suitable for thedetection of changes in acceleration due to an operation in which theused depresses touch panel 5 with a finger while continuously touchingtouch panel 5 with the finger can be determined by an experiment.

Secondary differential calculating unit 67 differentiates movingaverages. In the present embodiment, the value obtained bydifferentiating moving averages once is referred to as a secondarydifferential value C(n). Specifically, the secondary differential valueC(n) can be calculated by using the following equation (3):

C(n)=(S(n+1)−S(n−1))/2  (3)

Secondary differential calculating unit 67 outputs the calculatedsecondary differential value C(n) to local maximum extraction unit 69and local minimum extraction unit 71. FIG. 7 shows an example of a setof secondary differential values B(n). The secondary differential valuesC(n) shown in FIG. 7 are secondary differential values calculated basedon the moving averages S(n) shown in FIG. 6. A secondary differentialvalue C(n) is calculated in order to obtain an extremum of movingaverages S(n). The sampling point at which the secondary differentialvalue C(n) is closest to “0” indicates an extremum of moving averagesS(n). Secondary differential calculating unit 67 outputs, to localmaximum extraction unit 69 and local minimum extraction unit 71, thevariable n that indicates the sampling point at which the secondarydifferential value C(n) comes closest to “0”. In this embodiment, thesampling point at which the secondary differential value C(n) comesclosest to “0” is denoted by N.

Local maximum extraction unit 69 receives a moving average S(n) frommoving average calculating unit 65, and a sampling point N fromsecondary differential calculating unit 67. Local maximum extractionunit 69 extracts a large extremum from moving averages S(n).Specifically, if the moving average S(N) at the sampling point N inputfrom secondary differential calculating unit 67 is larger than thepreceding moving average S(N−1), it is regarded as a local maximum. Ifthe moving average S(N) at the sampling point N is regarded as a localmaximum, local maximum extraction unit 69 outputs the moving averageS(N) as a local maximum to difference calculating unit 73.

Local minimum extraction unit 71 receives a moving average S(n) frommoving average calculating unit 65, and a sampling point N fromsecondary differential calculating unit 67. Local minimum extractionunit 71 extracts a local minimum from moving averages S(n).Specifically, if the moving average S(N) at the sampling point N inputfrom secondary differential calculating unit 67 is smaller than thepreceding moving average S(N−1), it is regarded as a local minimum. Ifthe moving average S(N) at the sampling point N is regarded as a localminimum, local minimum extraction unit 71 outputs the moving averageS(N) as a local minimum to difference calculating unit 73.

Difference calculating unit 73 receives the local maximum from localmaximum extraction unit 69, and the local minimum from the local minimumextraction unit. Difference calculating unit 73 calculates thedifference between the maximum and the minimum and compares thecalculated difference with a threshold value. If the calculateddifference is equal to or larger than the threshold value, differencecalculating unit 73 detects an operation in which the user depressestouch panel 5 with a finger while continuously touching the panel(hereinafter referred to as a “depressing operation”), and outputs tosignal determining unit 55 a signal indicating that a depressingoperation has been input. The threshold value is a predetermined valueand can be obtained by an experiment. For example, if the user holdsmobile phone 1 in a hand and depresses the surface of touch panel 5 witha finger, mobile phone 1 is moved in space by the user's hand andreciprocates in a direction generally perpendicular to the surface oftouch panel 5, in which case the threshold may be the smallest absolutevalue of the primary differential value of the acceleration valuesgenerated at that moment.

Signal determining unit 55 receives key information from display controlunit 57, an indicated position from indicated position receiving unit51, and a signal indicating that a depressing operation has been inputfrom difference calculating unit 73. Signal determining unit 55 detectsan indication by the user of one of the keys contained in the imagedisplayed on LCD 7 based on the key information input from displaycontrol unit 57 and the indicated position input from indicated positionreceiving unit 51. The description below will be made for threealphabetic characters: “A”, “B” and “C” allocated to the key indicatedby the user.

While an indicated position indicating the position of the key to whichthe three alphabetic characters are allocated is being continuouslyinput from indicated position receiving unit 51, signal determining unit55 counts the number of times a signal indicating that a depressingoperation has been input is input from difference calculating unit 73. Akey table that associates the alphabetic characters allocated to thekeys contained in the image displayed on LCD 3 with the numbers ofindications is stored in EEPROM 17 beforehand. Signal determining unit55 refers to the key table to determine a character, which depends onthe key identified by the indicated position and the number counted. Forexample, while an indicated position indicating the position of the keyto which “ABC” is allocated is being continuously input, the unitselects the character “A” out of the characters “A”, “B” and “C” if asignal indicating that a depressing operation has been input is inputonce, selects the character “B” if such a signal is input twice, andselects the character “C” if such a signal is input three times. Eachtime signal determining unit 55 selects a character, it determines theselected character as the character to be displayed, for example, storesit in a predetermined area of RAM 15 and displays it in a predeterminedarea of LCD 3.

FIG. 8 is a flow chart showing an example of a flow of a process fordetecting an operation. The operation detecting process is executed bycontrol unit 11 included in mobile phone 1, where control unit 11executes an operation detecting program. Referring to FIG. 8, controlunit 11 is on standby (NO at step S01) until it detects an indicationthat the user touches touch panel 5, and when it detects an indicationthat the user touches touch panel 5 (YES at step 01), the processproceeds to step S02. When an indicated position is input from touchpanel 5, control unit 11 detects an indication that the user touchestouch panel 5. In other words, the operation detecting process isexecuted on condition that the user touches touch panel 5.

At step S02, the variable n is set to “1” and the other variables areinitialized. The variables that are initialized at this moment includethe stop counter C1, the operation counter C2, the local maximum MAX,the local minimum MIN, the array of acceleration values A(n), the arrayof primary differential values B(n), the array of moving averages S(n),and the array of secondary differential values C(n); they are set to“0”.

At step S03, the acceleration value output by acceleration sensor 19 isacquired, and the array of acceleration values A(n) is set to theacquired acceleration values.

At step S04, it is determined whether an indication that the usertouches touch panel 5 has been detected, similar to step S01. If anindication by the user has been detected, the process proceeds to stepS05; if not, the process ends. That is, the operation detection processdetects an operation in which the user depresses touch panel 5 with afinger from the moment the user's finger gets in contact with touchpanel 5 until it lifts off touch panel 5.

At step S05, it is determined whether the variable n is larger than “2”.If the variable n is larger than “2”, the process proceeds to step S06;if not, the process proceeds to step S22. Step S06 and the subsequentsteps are performed if the variable n is larger than “2” in order tocalculate a primary differential value at step S06. At step S22, thevariable n is incremented by “1”, and the process proceeds to step S03.

At step S06, a primary differential variable is calculated, and thearray B(n) is set to calculated primary differential values.Specifically, a primary differential value is calculated by using theabove equation (1) from the acceleration value A(n−1) and theacceleration value A(n+1).

At step S07, it is determined whether the variable n is larger than “7”.If the variable n is larger than “7”, the process proceeds to step S08;if not, the process proceeds to step S22. Step S08 and the subsequentsteps are performed if the variable n is larger than “7” in order tocalculate a moving average at step S08. At step S22, the variable n isincremented by “1”, and the process returns to step S03.

At step S08, a moving average of primary differential values iscalculated, and the array S(n) is set to calculated moving averages.Specifically, a moving average is calculated by using the above equation(2) from the primary differential values B(n−5), B(n−4), B(n−3), B(n−2),B(n−1) and B(n).

At the next step, S09, it is determined whether the absolute value of acalculated moving average S(n) is equal to or smaller than the thresholdvalue T1. If the absolute value of a moving average S(n) is equal to orsmaller than the threshold T1, the process proceeds to step S10; if not,the process proceeds to step S12. At step S10, the stop counter C1 isincremented by “1”, and the process proceeds to step S11. At step S11,it is determined whether the stop counter C1 is larger than thethreshold value P. If the stop counter C1 is larger than the thresholdvalue P, the process ends; if not, the process proceeds to step S12. Thestop counter C1 counts the number of times the absolute value of amoving average S(n) is equal to or smaller than the threshold value T1in a row. If the stop counter C1 is larger than the threshold value P,the process ends; thus, the process ends when the absolute value of amoving average S(n) is equal to or smaller than the threshold value T1 Ptimes or more often in a row. If the absolute value of a moving averageS(n) is equal to or smaller than the threshold value T1, it means thatacceleration remains unchanged; if this state persists for a certainperiod of time, it means that no operation is being input to mobilephone 1 or the mobile phone is not held in a hand and lies on a desk,for example; thus, it is determined that mobile phone 1 is not beingoperated.

At step S12, it is determined whether the variable n is larger than “9”.If the variable n is larger than “9”, the process proceeds to step S13;if not, the process proceeds to step S22. Step S13 and the subsequentsteps are performed if the variable n is larger than “9” in order tocalculate a secondary differential value based on moving averages atstep S13. At step S22, the variable n is incremented by “1”, and theprocess returns to step S03.

At step S13, a differential value is calculated from moving averagesS(n), and the array C(n) is set to calculated differential values.Specifically, a differential value is calculated by using the aboveequation (3) from the moving average S(n−1) and the moving averageS(n+1). In the present embodiment, a differential value that can beobtained by differentiating moving averages S(n) is denoted by asecondary differential value C(n).

At step S14, it is determined whether the secondary differential valueC(n) is “0”. It should be noted that the C(n) may not be “0” for somesampling points, in which case, in order to determine whether the C(n)is “0”, it may be determined whether the C(n) is closest to “0”. If thesecondary differential value C(n) is “0”, the process proceeds to stepS15; if not, the process proceeds to step S22. If the secondarydifferential value C(n) is “0”, the moving average S(n) is at a localmaximum or a local minimum.

At step S15, the moving averages S(n) and S(n−1) are compared with eachother. If the moving average S(n) is larger than the moving averageS(n−1), the process proceeds to step S16; if not, the process proceedsto step S17. At step S16, the local maximum MAX, a variable to which thelocal maximum can be set, is set to the moving average S(n), and theprocess proceeds to step S18. On the other hand, at step S17, the localmaximum MIN, a variable to which the local maximum can be set, is set tothe moving average S(n), and the process proceeds to step S18.

At step S18, the difference between the local maximum MAX and the localminimum MIN is calculated, and it is determined whether that differenceis larger than the threshold value T2. If the difference is larger thanthe threshold value T2, the process proceeds to step S19; if not, theprocess proceeds to step S22. At step S19, the operation counter C2 isincremented by “1”. Thus, when the difference between a local maximumand a local minimum is equal to or larger than the threshold value T2,one operation in which the user depresses touch panel 5 with a finger isdetected, thereby removing vibrations unrelated to a vibration that iscaused by an operation in which the user depresses touch panel 5 with afinger. Then, at step S20, the variables MAX, MIN and C1 are set to “0”,and the process proceeds to step S21.

At step S21, a character is determined based on an indicated positioninput from touch panel 5 and a value in the operation counter C2, andthe process proceeds to step S22. At step S22, the variable n isincremented by “1”, and the process returns to step S03. Specifically, akey indicated by the user is identified based on key informationincluding the pair of items: name and area for each of the keyscontained in the image displayed on LCD 3 and on the indicated positioninput from touch panel 5, and the identified key and the key table areused to determine the set of characters that have been allocated to theidentified key; then, out of the set of characters, the charactercorresponding to the number of operations is determined. The number ofoperations is the value in the operation counter C2.

With reference to the acceleration values shown in FIG. 4, a firstvibration at sampling points 1-8, a second vibration at sampling points8-21 and a third vibration at sampling points 22-33 are shown. The firstvibration is at its maximum at sampling point 4, and at its minimum atsampling point 7; the second vibration is at its maximum at samplingpoint 14, and at its minimum at sampling point 20; and the thirdvibration is at its maximum at sampling point 27, and at its minimum atsampling point 32.

On the other hand, referring to FIG. 6, moving averages are shown with afirst vibration at sampling points 7-10, a second vibration at samplingpoints 11-22 and a third vibration at sampling points 23-35. The firstvibration is at its maximum at sampling point 7, and at its minimum atsampling point 9. The difference between the local maximum and the localminimum is smaller than the threshold value T2, such that an operationin which the user depresses touch panel 5 with a finger is not detected.

The second vibration is at its maximum at sampling point 13, and at itsminimum at sampling point 19. The difference between the local maximumand the local minimum is larger than the threshold value T2, such thatan operation in which the user depresses touch panel 5 with a finger isdetected. The third vibration is at its maximum at sampling point 26,and at its minimum at sampling point 32. The difference between thelocal maximum and the local minimum is larger than the threshold valueT2, such that an operation in which the user depresses touch panel 5with a finger is detected.

Thus, as described above, mobile phone 1, which serves as a portabledevice according to the present embodiment, detects an operation inwhich the user depresses touch panel 5 while continuously touching touchpanel 5 based on an acceleration value detected while an indication ontouch panel 5 is being detected, allowing the user to input an operationin which the user depresses one and the same position on the touch panelseveral times.

Further, a specified operation is detected when the difference between alocal maximum and a local minimum of differential values of accelerationvalues is equal to or larger than a predetermined threshold value,allowing detecting one operation based on one cycle of vibrationgenerated by an operation in which the user depresses touch panel 5 withcontinuously touching touch panel 5.

Also, the detecting means calculates a moving average of differentialvalues output from acceleration sensor 19 for a predetermined period oftime and calculates the difference between a local maximum and asubsequent local minimum of moving averages, thereby reducing noisecontained in the detected acceleration values. Particularly, it mayreduce a signal different from a vibration generated by an operation inwhich the user depresses touch panel 5 while continuously touching touchpanel 5.

Further, one character is determined out of a plurality of charactersbased on an indicated position detected by touch panel 5 and a number oftimes an operation in which the user depresses touch panel 5 whilecontinuously touching touch panel 5 is detected, thereby allowing theuser to select one character from a plurality of characters by justperforming an operation(s) in which the user depresses one and the sameposition.

Also, acceleration sensor 19 is disposed in such a way that it candetect an acceleration value in the direction perpendicular to the panelsurface of touch panel 5, thereby detecting a vibration generated by anoperation in which the user depresses touch panel 5 while continuouslytouching touch panel 5.

While the above embodiment describes a mobile phone 1 that serves as oneexample of a portable device, the present invention can, of course, beunderstood as including a method of detecting an operation for causingmobile phone 1 to perform the process for detecting an operation shownin FIG. 8, or a program for detecting an operation for causing controlunit 11 (i.e. a computer) included in mobile phone 1 to perform thatmethod.

It should be understood that the embodiments disclosed above areexemplary only and not restrictive in any way. The scope of the presentinvention is indicated not by the above description but by the Claims,and all the modifications equivalent in meaning to and within the Claimsare intended to be included.

1. A portable device comprising: a touch panel; an acceleration sensordetecting an acceleration value; and a detecting unit detecting aspecified operation based on an acceleration value detected by saidacceleration sensor while an indication is being detected by said touchpanel.
 2. The portable device according to claim 1, wherein saiddetecting unit detects said specified operation when a differencebetween a local maximum and a local minimum of differential values ofacceleration values is equal to or larger than a predetermined thresholdvalue.
 3. The portable device according to claim 2, wherein saiddetecting unit includes a moving average unit calculating a movingaverage of differential values output from said acceleration sensor forpredetermined period of time to calculate a difference between a localmaximum and a subsequent local minimum of calculated moving averages. 4.The portable device according to claim 1, further comprising a signaldetermining unit determining one out of a plurality of signals based onposition information detected by said touch panel and a number of timessaid specified operation is detected by said detecting unit.
 5. Theportable device according to claim 1, wherein said acceleration sensordetects an acceleration value in a direction perpendicular to a panelsurface of said touch panel.
 6. A method of detecting an operationperformed by a portable device including a touch panel, comprising thesteps of detecting an acceleration value; and detecting a specifiedoperation based on an acceleration value detected while an indication isbeing detected by said touch panel.
 7. The method of detecting anoperation according to claim 6, wherein said step of detecting includesthe step of detecting said specified operation when a difference betweena local maximum and a local minimum of differential values ofacceleration values is equal to or larger than a predetermined thresholdvalue.
 8. The method of detecting an operation according to claim 7,wherein said step of detecting includes the steps of: calculating amoving average of differential values of acceleration values for apredetermined period of time; and calculating a difference between alocal maximum and a subsequent local minimum of calculated movingaverages.
 9. The method of detecting an operation according to claim 7,further comprising the step of determining one out of a plurality ofsignals based on position information detected by said touch panel and anumber of times said specified operation is detected in said step ofdetecting.
 10. The method of detecting an operation according to claim7, wherein an acceleration value detected in said step of detecting isin a direction perpendicular to a panel surface of said touch panel. 11.A computer-readable storage medium storing a program for detecting anoperation executed by a portable device including a touch panel, forcausing a computer to execute the steps of: detecting an accelerationvalue; and detecting a specified operation based on an accelerationvalue detected while an indication is being detected by the touch panel.